package org.jxht.web.api;

import org.jxht.service.CourseService;
import org.jxht.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;

/**
 * Created by huang on 2017/3/1 0001.
 */
@Controller
@RequestMapping("JxhtWeb/LoginController")
public class LoginController {

    @Autowired
    private LoginService loginService;

    @Autowired
    private CourseService courseService;

    @RequestMapping(value = "/{userId}/Login",method = RequestMethod.POST)
    @ResponseBody
    public String Login(@PathVariable("userId")int userId,
                                 @RequestParam(value = "userPwd")String userPwd,
                                 @RequestParam(value = "status")String status) throws IOException {
        return loginService.LoginVerification(userId,userPwd,status);
    }
}
